#include <cstdlib>
#include <iostream>
#define strlk 10 using namespace std;
int main(int argc, char *argv[])
{
int resultat [5];
resultat[0]=10;
resultat[1]=20;
resultat[2]=30;
resultat[3]=40;
resultat[4]=50;
cout<<"plats 1 = "<<resultat[0]<< " plats 3 = "<<resultat[2]<<endl<<endl;
cout<<"Hela listan"<<endl;
for(int i=0; i<5; i++)
{
cout<<resultat[i]<<endl;
}
cout<<endl;
cout<<"********************************************************************"<<endl;
cout<<"********************************************************************"<<endl;
cout<<endl;
int res2[5];
for(int i=0; i<5; i++)
{
cout<<"Ange varde for plats " <<i+1<<endl;
cin>>res2[i] ;
}
cout<<"Hela lista res2"<<endl;
for(int i=0; i<5; i++)
{
cout<<res2[i]<<endl;
}
cout<<endl;
cout<<"********************************************************************"<<endl;
cout<<" **********************SOKNING*************************"<<endl;
cout<<"********************************************************************"<<endl;
cout<<endl;
cout<<" SOKER VARDEN STORRE AN 30 I LISTA resultat"<<endl;
for(int i=0; i<5; i++)
{
if(resultat[i]>30)
cout<<" varde "<<i+1<<" ar storre an 30"<<endl;
}
cout<<endl;
cout<<"********************************************************************"<<endl;
cout<<"********************************************************************"<<endl;
cout<<endl;
int lista3[strlk];
for(int i=0; i<strlk; i++)
{
lista3[i]=(strlk*i);
}
cout<<"Hela lista3"<<endl;
for(int i=0; i<strlk; i++)
{
cout<<lista3[i]<<endl;
}
cout<<endl<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}